package org.dromara.finance.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.finance.domain.Bill;
import org.dromara.finance.domain.bo.BillBo;
import org.dromara.finance.domain.report.PaymentBillVO;
import org.dromara.finance.domain.report.ReceiveBillVO;
import org.dromara.finance.domain.vo.BillVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;

/**
 * 收款登记Mapper接口
 *
 * @author xxy
 * @date 2025-08-19
 */
public interface BillMapper extends BaseMapperPlus<Bill, BillVo> {

    BillVo selectSaleBillById(Long id);

    BillVo selectPurchaseBillById(Long id);

    Page<BillVo> selectSalePage(Page<?> page, @Param("bo") BillBo bo);

    Page<BillVo> selectPurchasePage(Page<?> page, @Param("bo") BillBo bo);

    List<ReceiveBillVO> selectReceivesByContractId(Long id);

    List<PaymentBillVO> selectPaymentsByContractId(Long id);
}
